package com.zmx.job.admin.controller;

import com.zmx.job.admin.entity.MallJobInfo;
import com.zmx.job.admin.service.MallJobInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description: 任务控制器
 * @ClassName: JobInfoController
 * @Author zhaomxr
 * @Date 2021-12-28 16:46
 */
@Slf4j
@RestController
@RequestMapping("job")
public class JobInfoController {

    @Autowired
    private MallJobInfoService mallJobInfoService;

    @GetMapping
    public List<MallJobInfo> getJobInfo(@RequestParam(required = false) String name){
        List<MallJobInfo> mallJobInfos = mallJobInfoService.getJobInfo(name);
        return mallJobInfos;
    }

}
